import threading
import time
import random


class SerialThread(threading.Thread):
    event = threading.Event

    def __init__(self, arg, queue ):
        super(SerialThread, self).__init__()
        self.arg = arg
        self.queue = queue

    def run(self):
        while True:
            time.sleep(0.01)
            d1 = [random.randrange(300, 500),time.time()]
            time.sleep(0.01)
            d2 = [random.randrange(1200, 1500),time.time()]
            self.queue.put(d1)
            self.queue.put(d2)


